<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel="stylesheet" href="lib/bootstrap.css">
    <title>Document</title>
</head>

<body>
    <div id="app">
        <ul>
            <li v-for="item in list" :key="item.id">{{item.id}},{{item.name}}</li>
        </ul>

        <hr>

        <table class="table table-bordered table-hover">
            <thead>
                <th>索引</th>
                <th>Id</th>
                <th>姓名</th>
            </thead>
            <tbody>
                <tr v-for="(item,index) in list">
                    <td>{{index}}</td>
                    <td>{{item.id}}</td>
                    <td>{{item.name}}</td>
                </tr>
            </tbody>
        </table>
    </div>

    <script src="./lib/vue-2.6.12.js"></script>
    <script>
        const mv = new Vue({
            el: '#app',
            data: {
                list: [{
                    id: 1,
                    name: 'zs'
                }, {
                    id: 2,
                    name: 'ls'
                }]
            },

        })
    </script>
</body>

</html>